package com.demo.service;

import com.demo.dto.AnswerDTO;
import com.demo.dto.Result;
import com.demo.entity.Answer;
import com.baomidou.mybatisplus.extension.service.IService;
import com.demo.vo.AnswerVO;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Zeng
 * @since 2022-03-23
 */
public interface AnswerService extends IService<Answer> {

    Result<Answer> postAnswer(AnswerDTO answerDTO);

    Result<Answer> deleteAnswer(Integer answerId);

    Result<Answer> updateAnswer(Integer answerId, AnswerDTO answerDTO);

    Result<List<AnswerVO>> queryAnswersByQuestionId(String questionId, Integer current);

    Result<List<AnswerVO>> getAnswerListByCurrentUserId();

    Result<List<AnswerVO>> queryAnswersByUserId(Integer userId);
}
